import { getAction, postAction, deleteAction } from '@/utils/request'
import _ from 'lodash'
// 重复校验
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
// json setting
const getJsonSetting = (params)=>getAction("/sys/jsonSetting", params);
const deleteJsonSetting = (params)=>deleteAction("/sys/jsonSetting", params);
const saveJsonSetting = (data)=>postAction("/sys/jsonSetting", data);

// report
const getOnlinePages = (data)=>postAction("/online_page/list", data);
const getOPageById = (params)=>getAction("/online_page/detail", params);
const deleteOPageById = (params)=>{
    return deleteAction("/online_page/delete" ,{ids: params}); //注意末尾的/
 };
const saveOPage = (data)=>postAction("/online_page/config", data);

// 导出
export {
    duplicateCheck,
    getJsonSetting,
    saveJsonSetting,
    deleteJsonSetting,
    getOnlinePages,
    deleteOPageById,
    saveOPage
}
